//
//  MTClubActivitiesDetailModel.swift
//  MT
//
//  Created by ooops on 2019/12/31.
//  Copyright © 2019 张强. All rights reserved.
//

import Foundation
import ObjectMapper
import MTCategory

class MTClubActivitiesDetailModel: Mappable {

    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?
    /// 返回值
    var result: MTClubActDetailResultModel?

    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
    }
}

class MTClubActDetailResultModel: Mappable {

    /// 活动详情
    var clubActivityVo: MTClubActDetailModel?
    /// 用户细腻系
    var userList: [MTClubActDetailUserModel]?

    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        clubActivityVo        <- map["clubActivityVo"]
        userList        <- map["userList"]
    }

}


class MTClubActDetailModel: Mappable {

    /// 活动id
    var clubId: String?
    /// 活动名称
    var name: String?
    /// 活动人数
    var num: Int = 0
    /// 省
    var province: String?
    /// 市
    var city: String?
    /// 县
    var area: String?
    /// 活动地址
    var address: String?
    /// 活动描述
    var remark: String?
    /// 已报名登记数 0
    var enrollNum: Int = -1
    /// 是否活动拥有者
    var isOwner: Bool?
    /// 活动开始时间
    var startTime: String?
    /// 活动ID
    var id: Int?
    /// 是否已经加入该俱乐部活动
    var joined: Bool?

    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        clubId        <- map["clubId"]
        name        <- map["name"]
        num        <- map["num"]
        province        <- map["province"]
        city        <- map["city"]
        area        <- map["area"]
        address        <- map["address"]
        remark        <- map["remark"]
        enrollNum        <- map["enrollNum"]
        isOwner         <- map["isOwner"]
        startTime         <- map["startTime"]
        id         <- map["id"]
        joined     <- map["joined"]
    }

}


class MTClubActDetailUserModel: Mappable {

    /// 参加活动的用户id
    var activityId: Int?
    /// 用户头像
    var href: String?
    /// 用户昵称
    var nickname: String?
    /// 用户id
    var userId: String?
    /// 极光用户名
    var userName: String?
    
    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        activityId        <- map["activityId"]
        href        <- map["href"]
        nickname        <- map["nickname"]
        userId        <- map["userId"]
        userName         <- map["userName"]

    }

}
